﻿using System;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x02000094 RID: 148
	public class MechSpiderParticles : MonoBehaviour
	{
		// Token: 0x06000535 RID: 1333 RVA: 0x00005476 File Offset: 0x00003676
		public void Start()
		{
			this.particles = (ParticleSystem)base.GetComponent(typeof(ParticleSystem));
		}

		// Token: 0x06000536 RID: 1334 RVA: 0x00033C50 File Offset: 0x00031E50
		public void Update()
		{
			float magnitude = this.mechSpiderController.inputVector.magnitude;
			float constant = Mathf.Clamp(magnitude * 50f, 30f, 50f);
			//this.particles.emission.rate = new ParticleSystem.MinMaxCurve(constant);
			this.particles.startColor = new Color(this.particles.startColor.r, this.particles.startColor.g, this.particles.startColor.b, Mathf.Clamp(magnitude, 0.4f, 1f));
		}

		// Token: 0x040003FB RID: 1019
		public MechSpiderController mechSpiderController;

		// Token: 0x040003FC RID: 1020
		public ParticleSystem particles;
	}
}
